<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">
    <div class="row">
        <div style="background: #ffffff;">
            <form class="form-horizontal" name="dialogDHForm" novalidate>
                <div class="panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><strong>{{'配置传送门' | dyLanguage}}</strong></h3>
                    </div>
                    <div class="panel-body panel-dialog">

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'不限时间' | dyLanguage}}</label>
                            <label class="switch switch-small">
                                <input ng-checked="currentConfig.longTime" ng-click="updateSelection($event, currentConfig.longTime)" type="checkbox" ng-model="currentConfig.longTime"/>
                                <span></span>
                            </label>
                        </div>

                        <div class="form-group" ng-show="currentConfig.longTime != true">
                            <label class="col-md-3 col-xs-12 control-label">{{'开始时间' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control datepicker" cm-datepicker name="beginTime" placeholder="{{'请输入显示的开始时间' | dyLanguage}}" ng-model="currentConfig.beginTime"/>
                                </div>
                                <span class="help-block">{{'请输入显示的开始时间' | dyLanguage}}</span>
                            </div>
                        </div>

                        <div class="form-group" ng-show="currentConfig.longTime != true">
                            <label class="col-md-3 col-xs-12 control-label">{{'结束时间' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control datepicker" name="endTime" cm-datepicker placeholder="{{'请输入显示的结束时间' | dyLanguage}}" ng-model="currentConfig.endTime"/>
                                </div>
                                <span class="help-block">{{'请输入显示的结束时间' | dyLanguage}}</span>
                            </div>
                        </div>

                        <!--<p>请按照提示设置章节相关勋章的信息。</p>-->
                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'当前课程' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left" ng-show="!!currentConfig.course">
                                <div class="input-group">
                                    <ul>
                                        <li>{{'课程名称：' | dyLanguage}}{{currentConfig.course.name}}</li>
                                        <li>{{'课程编码：' | dyLanguage}}{{currentConfig.course.code}}</li>
                                    </ul>
                                </div>
                            </div>
                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left" ng-show="!currentConfig.course">
                                <div class="input-group">
                                    <span style="color: red;">{{'无' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'课程' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="queryCourseKey" placeholder="{{'输入课程名称或编码, 点击匹配进行查询' | dyLanguage}}"/>
                                </div>
                            </div>
                            <button class="btn btn-primary" ng-click="queryCourse()"><i class="fa fa-search"></i>{{'搜索' | dyLanguage}}</button>
                        </div>

                        <div class="form-group" ng-repeat="course in courseResults">
                            <label class="col-md-3 col-xs-12 control-label"></label>

                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left">
                                <ul>
                                    <li>{{'名称：' | dyLanguage}}{{course.name}}</li>
                                    <li>{{'编码：' | dyLanguage}}{{course.code}}</li>
                                </ul>
                            </div>
                            <button class="btn btn-info" ng-click="setCurrentCourse(course)"><i class="fa fa-plus"></i> {{'匹配' | dyLanguage}}</button>
                        </div>

                        <!-- ------------------------------------------------------------------------ -->

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'当前传送门' | dyLanguage}}</label>
                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left" ng-show="!!currentConfig.event">
                                <div class="input-group">
                                    <ul>
                                        <li>{{'名称：' | dyLanguage}}{{currentConfig.event.name}}</li>
                                        <li>{{'编码：' | dyLanguage}}{{currentConfig.event.code}}</li>
                                    </ul>
                                </div>
                            </div>
                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left" ng-show="!currentConfig.event">
                                <div class="input-group">
                                    <span style="color: red;">{{'无' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'传送门' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="queryDoorKey" placeholder="{{'输入传送门名称或编码, 点击匹配进行查询' | dyLanguage}}"/>
                                </div>
                            </div>
                            <button class="btn btn-primary" ng-click="queryDoor()"><i class="fa fa-search"></i> {{'搜索' | dyLanguage}}</button>
                        </div>

                        <div class="form-group" ng-repeat="record in doorResults">
                            <label class="col-md-3 col-xs-12 control-label"></label>
                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left">
                                <ul>
                                    <li>{{'名称：' | dyLanguage}}{{record.name}}</li>
                                    <li>{{'编码：' | dyLanguage}}{{record.code}}</li>
                                </ul>
                            </div>
                            <button class="btn btn-info" ng-click="setCurrentDoor(record)"><i class="fa fa-plus"></i> {{'匹配' | dyLanguage}}</button>
                        </div>

                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-danger" ng-click="cancel()"><i class="fa fa-times"></i>{{'取消' | dyLanguage}}</button>
                        <button class="btn btn-info" ng-click="saveConfigDoorForCourse()"><i class="fa fa-check"></i>{{'确定' | dyLanguage}}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- END PAGE CONTENT WRAPPER -->